import { defineComponent, h, withCtx } from '@vue/runtime-core'
import endPageImg from '../../assets/endPage.jpg'
import restartImg from '../../assets/restartBtn.png'

export default defineComponent({
    setup(props, ctx) {
        const handleClick = function(){
            //console.log('重来')
            ctx.emit('changePage', 'gamePage')
        }
        return { handleClick }
    },
    render(ctx) {
        return h('Container',[
            h('Sprite',{texture: endPageImg}),
            h('Sprite',{texture: restartImg, x: 240, y: 500,
                interactive: true, onClick: ctx.handleClick})
    ])
    }
})